<template>
  <div>
    <nav>
      <button @click="currentView = 'chat'">聊天窗口</button>
      <button @click="currentView = 'list'">预约列表</button>
      <button @click="currentView = 'knowledge'">知识库</button>
    </nav>
    <ChatWindow v-if="currentView === 'chat'"/>
    <ListPage v-if="currentView === 'list'"/>
    <KnowledgeBase v-if="currentView === 'knowledge'"/>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import ChatWindow from '@/components/ChatWindow.vue'
import ListPage from '@/components/ListPage.vue'
import KnowledgeBase from '@/components/KnowledgeBase.vue'

const currentView = ref('chat')
</script>

<style>
body {
  overflow: auto;
}

nav {
  margin-bottom: 20px;
}

button {
  margin-right: 10px;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
}

button:hover {
  background-color: #45a049;
}
</style>
